# -*- coding=utf-8-*-
"""
@File:memory_selection
@Author:Created by Han X.Y
@Date:on 2021/8/4 16:49 
"""
class TreeNode:
    def __init__(self,val=None,left=None,right=None):
        self.val=val
        self.left=left
        self.right=right


def preTraverse(root):
    """
    对当前树结构进行遍历
    Args:
        root:

    Returns:

    """
    if root is None:
        return
    print(root.val)
    preTraverse(root.left)
    preTraverse(root.right)




if __name__=="__main__":
    root=TreeNode(TreeNode('-'),left=TreeNode(val=TreeNode('*'),left=TreeNode('a'),right=TreeNode('b')),right=TreeNode('c'))
    tmp=preTraverse(root)
    print(tmp)
